package com.gyt.manager.common.annotation;

import org.springframework.core.annotation.AliasFor;

import javax.persistence.Inheritance;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * elastic-job自定义配置注解类
 * @author gyt
 * 配置项可参见：http://elasticjob.io/docs/elastic-job-lite/02-guide/config-manual/
 */
@Inheritance
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ElasticSimpleJob {
    @AliasFor("cron")
    String value() default "";

    @AliasFor("value")
    String cron() default "";

    String jobName() default "";

    int shardingTotalCount() default 1;

    String shardingItemParameters() default "";

    String jobParameter() default "";

    String dataSource() default "";

    String description() default "";

    boolean disabled() default false;

    boolean overwrite() default true;
}
